package day11.part2;

/**
 * @Author juzipi
 * @Date 2021/6/27 16:17
 * @Info
 */
public class Person {


    public String eat(){
        return "吃";
    }


    protected String sleep(){
        return "睡";
    }

    public Person getPerson(){
        return new Person();
    }

    public void exceptionPao(){
        throw new RuntimeException();
    }

    //static 方法无法重写
    public static void test(){
        System.out.println("侧手");
    }

    public void walk(){
        //重写过 调用的就是重写过的方法，
        System.out.println("=========");
        System.out.println("水水水"+eat());
        System.out.println("=========");
        //没重写过就是父类中的方法
        System.out.println("++++++++++");
        System.out.println(sleep());
        System.out.println("++++++++++");
        System.out.println("走走做足走走走族");
    }

}
